<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script type="text/javascript">		
		function Circle(radios){
			PI = 3.14
			this.radios = radios
			this.getPerimeter = function(){
				document.writeln('半径为',radios,'的圆周长是',(PI * radios * 2).toFixed(2),'<br/>')
			}
			this.getArea = function(){
				document.writeln('半径为',radios,'的圆面积是',(PI * radios * radios).toFixed(2),'<br/>')
			}
		}
		function Rectangle(length,width){
			this.length = length
			this.width = width
			this.getPerimeter = function(){
				document.writeln('长为',length,'宽为',width,'的矩形的周长',(length + width) * 2,'<br/>')
			}
			this.getArea = function(){
				document.writeln('长为',length,'宽为',width,'的矩形的面积',length * width,'<br/>')
			}
		}
		
		let n = new Circle(5)
		n.getPerimeter()
		n.getArea()
		let m = new Rectangle(7,5)
		m.getPerimeter()
		m.getArea()
	</script>
</html>
